// const app = getApp();
// import api from './api.js';
// import storage from './Storge.js';
// import { tokenKey } from './constant.js';
// import net from './Request.js';


//show toast
const showToast = title => {
    wx.showToast({
        title: title,
        icon: 'none',
        duration: 1000,
        mask: true
    });
}
//show modal
const showModal = (title, content, ok, cancle) => {
    wx.showModal({
        title: title,
        content: content,
        success: function (r) {
            if (r.confirm) {
                if (ok != null && (typeof ok === 'function')) {
                    ok();
                }
            } else {
                if (cancle != null && (typeof cancle === 'function')) {
                    cancle();
                }
            }
        }
    });
}

export {
    
    showToast,
    showModal
}